<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>flex基本使用</title>
		<style>
			.box{
				width: 280px;
				height: 590px;
				border: 1px red solid;
				/* 设置弹性盒子 */
				display: flex;
				/* 子元素自动换行 */
				flex-wrap: wrap;
				/* 设置子元素排列方式 */
				flex-direction: row;
				/* 子元素主轴对齐方式--水平对齐方式 */
				justify-content: space-around; /* 两端分散对齐，两头留空白 */
				/* 子元素侧轴对齐方式--垂直对齐方式 */
				align-items: center;
			}
			.itme{
				width: 100px;
				height: 100px;
				background-color: aquamarine;
				/* margin-top: 5px; */
				font-size: 50px;
			}
			
			/* 设置子元素不同的高度 */
			/*  选择box里面的第一个itme */
			/* .box .itme:nth-child(1){ 
				height: 100px;
			}
			.box .itme:nth-child(2){ 
				height: 150px;
			}
			.box .itme:nth-child(3){
				height: 200px;
			}
			.box .itme:nth-child(4){
				height: 50px;
			}
			.box .itme:nth-child(5){
				height: 70px;
			}
			.box .itme:nth-child(6){
				height: 30px;
			} */
			
			
			
			.box2{
				width: 500px;
				height: 400px;
				display: flex;
				justify-content: center;
				align-items: center;
				border: 1px blue solid;
			}
			.box2 > div{
				width: 100px;
				height: 100px;
				background-color: yellow;
			}
		</style>
	</head>
	<body>
		
		<div class="box">
			<div class="itme">1</div>
			<div class="itme">2</div>
			<div class="itme">3</div>
			<div class="itme">4</div>
			<div class="itme">5</div>
			<div class="itme">6</div>
		</div>
		
		<div class="box2"> 
			<div></div>
		</div>
		
	</body>
</html>